<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>过渡练习</title>
        <style type="text/css">
            .box{
                overflow: hidden;
                border:1px solid black;
                height: 190px;
                width: 300px;
                position: relative;
            }
            .box:hover .smallbox{
                top: 0;
            }
            img{
                width: 100%;
                height: 100%;
            }
            .smallbox{
                width: 100%;
                height: 100%;
                transition: all 4s;
                background: yellowgreen;
                opacity: 0.6;
                position: absolute;
                top: -100%;
            }
        </style>
    </head>
    <body>
        <div class="box">
            <img src="img/big_front.png" alt="">
            <div class="smallbox"></div>
        </div>
    </body>
</html>